<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title></title>

    <link rel="manifest" href="manifest.json">

    <!-- un-comment this code to enable service worker
    <script>
      if ('serviceWorker' in navigator) {
        navigator.serviceWorker.register('service-worker.js')
          .then(() => console.log('service worker installed'))
          .catch(err => console.log('Error', err));
      }
    </script>-->

    <link href="lib/ionic/css/ionic.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

    <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
    <link href="css/ionic.app.css" rel="stylesheet">
    -->

    <!-- ionic/angularjs js -->
    <script src="lib/ionic/js/ionic.bundle.js"></script>

    <!-- cordova script (this will be a 404 during development) -->
  
    

    <!-- your app's js -->
    <script src="js/app.js"></script>
    <script src="lib/ngCordova/dist/ng-cordova.js"></script> 
    <script type="application/json" src="js/ng-cordova.min.js"></script>
    <script src="cordova.js"></script>
    

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

    <script src="js/Controller/loginPageController.js"></script>
    <script src="js/Controller/homePageController.js"></script>

    <script src="js/service/loggedInUserService.js"></script>
    <script src="js/service/DocumentService.js"></script>
	<script type="text/javascript">
	function ab(){
	var x = 0;
	var ur = document.getElementById('previewing').src;
	var i = new Image(); 
	i.src = ur;
	x = i.width;
	i = null;
	var img2 = document.getElementById('img2');
	var can = document.getElementById('canvas1');
	var ctx = can.getContext('2d');
	var delta = 171 - x/2;
	ctx.fillRect(0,0,553,782); // something in the background
	ctx.drawImage(img2, 0, 0);
	var img = new Image();
	img.crossOrigin="Anonymous";
	img.onload = function() {
	ctx.drawImage(img, 105+delta,125);
	}
	img.src = ur; //transparent png
	}

	function ab3(){
	var can = document.getElementById('canvas1');
	var dataURL = can.toDataURL();
	alert(dataURL);
	}
	
	function ab2(el) {
	  var canvas = document.getElementById("canvas1");
	  var image = canvas.toDataURL("image/jpg");
	  el.href = image;
	};
	</script>
    
  </head>
  <body ng-app="starter">
    <ion-pane>
      <ion-nav-view >
       </ion-nav-view>
    </ion-pane>
  </body>
</html>
